home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / lxlt113.zip / LXUTIL.ENG < prev    next >
Text File  |  1996-05-06  |  12KB  |  231 lines

  1.              ───────────────────────────────────
  2.                  lxLite utility pack
  3.              ───────────────────────────────────
  4.  
  5.  
  6.  1.Abstract
  7.  ──────────
  8.    Some  time  after  releasing version 1.01 of lxLite (i.e. 1.0.1) (and some
  9.  time  before  :-)  I  wrote  some simple command-line utilites which greatly
  10.  simplified  my  life.    Because  apart from lxLite they don`t present nothing
  11.  interesting, I included them here for you to get them along with lxlite :-)
  12.  
  13.  2.unLock
  14.  ────────
  15.    unLock   is     a  simple  utility  which  allows  to    `unlock`  application
  16.  executables  which  is  currently  in    use.  Normally when an executable is
  17.  loaded by OS/2 its file is open with a deny-write sharing mode. This is done
  18.  because  LX  format  structure  is  designed not to swap out unused pages in
  19.  executables each time when they aren`t needed anymore, but rather to discard
  20.  them.    When  discardrd  page  is  needed  OS/2  simply  reads    it again from
  21.  executable.
  22.    However,  there is still a way to replace executables `on-the-fly` even if
  23.  they  are currently running. There is an so-called `well-known undocumented`
  24.  function  (which  in  fact  means  that it won`t be neccesarily supported in
  25.  future  versions  of OS/2) which allow to disable sharing protection on such
  26.  files.  Before  doing    that  OS/2 reads entire executable in swap file, then
  27.  page  swapping is done as with usual memory. If you`ll `unlock` many running
  28.  executables  at  the same time you can notice an increase in swap file size.
  29.  So,  this  is just an temporary work-around, you have better to reboot after
  30.  doing all neccesary things on former locked files.
  31.    The    command-line  format  of unLock is much like lxLite`s, except that it
  32.  have  much  less  options  :-)
  33.  
  34.      /E{+|-} r[E]cursive (+) file search through subdirectories
  35.          unLock will recursively search any directories which is
  36.          located below the directory of given filemask. If multiple 
  37.          masks are given multiple recursive searchs will be performed.
  38.  
  39.      /P{+|-} Enable (+) or disable (-) pause before each file
  40.          Before each file chCase will ask you whenever you really want
  41.          to unlock the file.
  42.  
  43.      /V{+|-} Verbose (show a lot of additional information)
  44.          If verbose option is disabled (/V-) only those messages are
  45.          left on screen which displays critical messages (i.e. errors),
  46.          otherwise after each filename unLock shows the result of unlock
  47.          operation - 'unlocked' or 'sharing violation'. Note that unLock
  48.          CANNOT unlock files which are locked in some other way than
  49.          executbles.
  50.  
  51.      /?,/H   Show a short help screen
  52.  
  53.  3.chCase
  54.  ────────
  55.    Some  time ago I was finally bored of the annoying habbit of some programs
  56.  to  write  their  files  in  upper  case.  And not only contents (almost any
  57.  program  which changes config.sys tends to convert it all to upper case when
  58.  I  like it to be in lower case) but filenames also. So i started this little
  59.  project as a problem-dedicated-and-easy-to-use replacement for REN command.
  60.  
  61.    The    main ideology of chCase is to divide filename in some `parts` then to
  62.  perform  some    case-conversions  on each part apart :-) You can define `part
  63.  separator` characters using /S"" option. By default chCase uses "." as `part
  64.  separator`.  I.e. filename chcase.is.a.great.prog will be divided into parts
  65.  'chcase',  'is',  'a',  'great'  and  'prog'. Further you can tell chCase to
  66.  convert  first  part to upper-case, second - to lower-case, third - to mixed
  67.  format (i.e. first letter in uppercase and rest in lowercase) and so on.
  68.  
  69.    The available options are:
  70.  
  71.     /C{#{.}} Convert to [L]ower/[U]pper/[M]ixed/[A]s-is case
  72.          You can define multiple `case conversion actions` - first one
  73.          will be applied on the first `part`; second - on the second
  74.          `part` and so on. Last `action` will be used for any extra
  75.          encountered `parts`, so if you`ll define only one option it
  76.          will be applyed on all filename parts. Some examples:
  77.  
  78.          filename             command line     resulting filename
  79.          ───────────────────────┬────────────────┬────────────────────────
  80.          mY.Very.lOnG.fIlE.NamE │/culam my*      │MY.very.lOnG.File.Name
  81.          just.an.example        │/cml jus*         │Just.an.example
  82.          leT.iT.bE            │/cmla let*      │Let.it.bE
  83.  
  84.     /E{+|-}  r[E]cursive (+) file search through subdirectories
  85.          chCase will recursively search any directories which are
  86.          located below the directory of given filemask. If multiple
  87.          masks are given multiple recursive searchs will be performed.
  88.  
  89.     /P{+|-}  Enable (+) or disable (-) pause before each file
  90.          Before each file chCase will ask you whenever you really want
  91.          to rename this file. The initial and final filenames are
  92.          displayed.
  93.  
  94.     /S"{#}"  Define separator character(s) OVER old ones
  95.          You can use this switch in the case when you have some files
  96.          which uses some other separators, for example space or
  97.          underscore. Note that the /S switch is NOT additive i.e.
  98.          any /S switch disables the action of precedent. Even "."
  99.          is cleared by /S switch, so if you for example want to use
  100.          as separators both "." and space " " you have to define them
  101.          both in a single /S switch as follows: /S" ."
  102.  
  103.          Just some examples:
  104.  
  105.          filename             command line     resulting filename
  106.          ───────────────────────┬────────────────┬────────────────────────
  107.          Mary has a Little.Lamb │/cm /s" ." mar* │Mary Has A Little.Lamb
  108.          john_wAs_a_lItTle_lame │/cuml /s"_"     │JOHN_Was_a_little_lame
  109.  
  110.     /V{+|-}  Verbose (show a lot of additional information)
  111.          If you will specify /V- chcase will leave on screen only
  112.          critical messages such as errors - all others will be cleared
  113.          immediately after they succeeded.
  114.  
  115.     /?,/H    Show a short help screen
  116.  
  117.  4.colMng
  118.  ────────
  119.    ColMng  is  a  simple  utility which will allow you to manipulate PM color
  120.  palettes,  in    particular  to    save, restore, copy them from file to file as
  121.  well as copying them inside the same .INI file. All color palettes which are
  122.  visible  in  Scheme  Palette  are  a entry in OS2SYS.INI; i.e. to copy color
  123.  palette  from one system to another you have to save the needed entry into a
  124.  separate  .INI  file and to `load` color palette on target machine. Now some
  125.  words    about  how and where the palettes are saved: The `default` palette is
  126.  kept  as  a  'PM_Default_Colors`  entry  in  OS2.INI  file;  it has the same
  127.  format  as  other  palettes:  the  only difference between them is that most
  128.  palettes  resides  in OS2SYS.INI but default colors are kept in OS2.INI. The
  129.  entry has a lot of subentries such as `ShadowHiliteBgnd', 'FieldBackground',
  130.  'DesktopText` and so on.
  131.    Along  with    PM_Default_Colors  there  is another palette entry in OS2.INI
  132.  called  PM_Colors. What is the difference between them? As far as I observed
  133.  PM_Default_Colors  is    the  palette  which  is used when you load some other
  134.  shell    replacement  (not  WPS),  and  PM_Colors  seems  to be used only when
  135.  WorkPlaceShell  is loaded. Note that any change regarding system colors will
  136.  act  only  after  reboot.  There  is a way to set colors directly, but I use
  137.  ColMng seldom and don`t bother about this :-)
  138.  ColMng is a command-line utility which have a lot of options (I already said
  139.  that I like them :-) They are:
  140.  
  141.  /C{#} Set custom palette. To view a list of available palettes use blank
  142.        palette name. If you specify a name after /C this will copy specified
  143.        PM_# entry from OS2SYS.INI into PM_Default_Colors entry of OS2.INI file.
  144.        If you are using WorkPlace Shell you will not notice changes without
  145.        removing the PM_Colors entry (see /D option).
  146.  
  147.  /S{#} Save color palette into resource file; empty name for default palette.
  148.        The specified palette (for example PM_Khaki_Colors) will be saved into
  149.        specified in command line file. The file will have a regular .INI
  150.        structure. For example ColMng /S mycols.ini will save PM_Default_Colors
  151.        entry into file `myco